package com.longcai.service.nearbyshop;

import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.baomidou.mybatisplus.extension.service.IService;
import com.longcai.advice.RollBackExecption;
import com.longcai.bean.ApiResult;
import com.longcai.bean.PageHelper;
import com.longcai.entity.nearby.ClyjNearbyShopsGoods;
import com.longcai.entity.nearby.vo.ClyjNearbyShopsGoodsQueryVo;
import com.longcai.entity.nearby.vo.ClyjNearbyGoodsTypeVo;
import com.longcai.page.table.PageTableResponse;

/****
 * 商品管理后台（外送模块）
 * @author Administrator
 *
 */
public interface ClyjNearbyShopsGoodsService extends IService<ClyjNearbyShopsGoods> {

    
    
    /****
	 * 查询 外送商品列表
	 * @return
	 */
	PageTableResponse queryShopsGoodsList(ClyjNearbyShopsGoodsQueryVo clyjNearbyShopsGoodsQueryVo, Integer start,Integer length);
	
	/****
	 * 查询 外送商品列表
	 * 选项卡    的数量
	 * @return
	 */
	Map<String ,Integer> queryShopsGoodsMode();
	
	
	/****
     * 外送商品列表
     * 下架单个
     * @param list
     * @return
	 * @throws RollBackExecption 
     */
	ApiResult<?> pullOffShelves(String goodsId) throws RollBackExecption;
	/****
     * 外送商品列表
     * 删除单个
     * @param list
     * @return
     */
	ApiResult<?> deleteNearbyShopsGoods(String goodsId) throws RollBackExecption;
	/****
     * 外送商品列表
     * 批量下架
     * @param list
     * @return
	 * @throws RollBackExecption 
     */
	ApiResult<?> batchPullOffShelves(List<Map<String, String>>  list) throws RollBackExecption;
	/****
     * 外送商品列表
     * 批量删除
     * @param list
     * @return
	 * @throws RollBackExecption 
     */
	ApiResult<?> batchDeleteNearbyShopsGoods(List<Map<String, String>>  list) throws RollBackExecption;

	/****
	   * 更新外送商品
	   * @param clyjNearbyPackageVo
	   * @return
	 * @throws RollBackExecption 
	 * @throws Exception 
	 */
	ApiResult<?> updateNearbyShopsGoods(ClyjNearbyShopsGoods clyjNearbyShopsGoods,MultipartFile[] goodsPicture) throws RollBackExecption;

	 
	  /****
	   * 保存外送商品
	   * @param clyjNearbyPackageVo
	   * @return
	 * @throws RollBackExecption 
	 * @throws Exception 
	 */
	ApiResult<?> saveNearbyShopsGoods(ClyjNearbyShopsGoods clyjNearbyShopsGoods,MultipartFile[] goodsPicture) throws RollBackExecption;

	/****
	 * 根据登陆用户查询商品类型
	 * @return
	 */
	PageTableResponse queryGoodsType(int  start, int  length);
	/****
	 * 修改商品类型
	 * @param clyjNearbyGoodsTypeVo
	 * @return
	 */
	ApiResult<?> updateGoodsType(ClyjNearbyGoodsTypeVo clyjNearbyGoodsTypeVo);
	/****
	 * 添加商品类型
	 * @param clyjNearbyGoodsTypeVo
	 * @return
	 */
	ApiResult<?> addGoodsType(ClyjNearbyGoodsTypeVo clyjNearbyGoodsTypeVo);

	ApiResult<?> deleteGoodsType(String string);

	ApiResult<?> batchDeleteGoodsType(List<Map<String, String>> typeIdList) throws RollBackExecption;

	ApiResult<?> updateGoodsTypeState(String state, String id);

	ApiResult<?> putOnsale(String goodsId, String type);

	
}
